<!DOCTYPE html>
<html
  layout:decorator="components/layout"
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
>
<head>
  <title>非法多媒体监测</title>
</head>
<body>
<div
  layout:fragment="content"
  id="app" v-cloak
>
  <div class="container">

    <div class="myHeader">
      <div class="myHeader-title">
        非法多媒体监测
      </div>
    </div>
    <el-row>
      <el-form label-width="80px">
        <el-row>
          <el-col :span="3">
            <el-form-item label-width="0px">

              <el-button type="primary" size="mini" icon="el-icon-search" @click="toggle">高级搜索</el-button>

            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="所在机房:">

              <el-select v-model="form.houseId" @change="searchPage" placeholder="请选择" size="mini" clearable>
                <el-option v-for="[key,val] in houseMap" :label="val" :key="key" :value="key">
                </el-option>
              </el-select>

            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="非法类型:">

              <el-select v-model="form.illegalType" @change="searchPage" placeholder="请选择" size="mini" clearable>
                <el-option v-for="[key,val] in fieldFormatter.moIllegalMedia.illegalTypeMap" :label="val" :key="key"
                           :value="key">
                </el-option>
              </el-select>

            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="协议:">

              <el-select v-model="form.protocol" @change="searchPage" placeholder="请选择" size="mini" clearable>
                <el-option v-for="[key,val] in fieldFormatter.moIllegalMedia.protocolMap" :label="val" :key="key"
                           :value="key">
                </el-option>
              </el-select>

            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="处置状态:">

              <el-select v-model="form.dealStatus" @change="searchPage" placeholder="请选择" size="mini" clearable>
                <el-option v-for="[key,val] in fieldFormatter.moIllegalMedia.dealStatusMap" :label="val" :key="key"
                           :value="key">
                </el-option>
              </el-select>

            </el-form-item>
          </el-col>
        </el-row>

      </el-form>
    </el-row>

    <el-row>
      <el-form label-width="100px" class="container-search" v-show="formShow">
        <el-row :gutter="10">
          <el-col :span="9">
            <el-form-item label="访问网址:">
              <el-input
                v-model="form.mediaInfo"
                clearable
                show-word-limit
                maxlength="64"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="3">
            <el-form-item label-width="0">
              <rx-search-action
                v-model="form.mediaInfoAction"
              ></rx-search-action>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="危险系数:">
              <el-row :gutter="5">
                <el-col :span="11">
                  <el-input
                    v-model="form.dangerFactorStart"
                    clearable
                    show-word-limit
                    maxlength="30"
                  ></el-input>
                </el-col>
                <el-col :span="1">至</el-col>
                <el-col :span="11">
                  <el-input
                    v-model="form.dangerFactorEnd"
                    clearable
                    show-word-limit
                    maxlength="30"
                  ></el-input>
                </el-col>
              </el-row>

            </el-form-item>
          </el-col>

          <el-col :span="9">
            <el-form-item label="实际域名:">
              <el-input
                v-model="form.domain"
                clearable
                show-word-limit
                maxlength="30"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="3">
            <el-form-item label-width="0">
              <rx-search-action
                v-model="form.domainAction"
              ></rx-search-action>
            </el-form-item>
          </el-col>

        </el-row>

        <div style="text-align:center; margin-bottom:20px">
          <el-button type="primary" size="medium" @click="searchPage">查 找</el-button>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <el-button type="primary" size="medium" @click="resetPage">重 置</el-button>
        </div>
      </el-form>
    </el-row>


    <div>
      <my-table
        :data="page.records"
        :columns="columns"
        @handle-selection-change="selection"
      >
        <template #media_info="scope">
          <a
            :href="scope.row.mediaInfo"
            target="_blank"
          >{{scope.row.mediaInfo.substring(0,30)+'...'}}</a>
        </template>

        <template #image="scope">
          <img width="100" height="100"
               :src="scope.row.mediaInfo"/>
        </template>
      </my-table>
      <div class="pagination">
        <el-pagination
          background
          @size-change="changeSize"
          @current-change="goto"
          :current-page="page.current"
          :page-sizes="[10, 20, 30]"
          :page-size="page.size"
          layout="total, sizes, prev, pager, next, jumper"
          :total="page.total"
        >
        </el-pagination>
        <div class="pagination-tool">
          <el-button
            size="mini"
            type="primary"
            @click="toggleDealPanelShow"
            v-realm="'illegal-monitoring:mo-illegal-media:edit'"
          >批量处置
          </el-button>
          <el-button
            size="mini"
            type="primary"
            @click="dealCancelSelected"
            v-realm="'illegal-monitoring:mo-illegal-media:edit'"
          >取消处置
          </el-button>
          <el-button
            size="mini"
            type="primary"
            @click="setTrust"
            v-realm="'illegal-monitoring:mo-illegal-media:edit'"
          >设置信任
          </el-button>
        </div>
      </div>

      <div
        class="container"
        v-show="dealPanelShow"
      >
        <div class="myHeader">
          <div class="myHeader-title">
            非法信息监测
          </div>
        </div>

        <el-form label-width="126px">
          <el-form-item label="处置操作:">
            <rx-radio
              v-model="dealPanelForm.dealStatus"
              :map="fieldFormatter.moIllegalInfoDeal.dealStatusMap"
            ></rx-radio>
          </el-form-item>

          <el-form-item label="处置备注:">
            <textarea
              id="remark"
              v-model="dealPanelForm.remark"
              cols="50%"
            >
              </textarea>
          </el-form-item>
        </el-form>
        <div>
          <el-button
            @click="dealSelected"
            type="primary"
            size="mini"
            v-realm="'illegal-monitoring:mo-illegal-media:edit'"
          >确认
          </el-button>
          <el-button
            size="mini"
            type="primary"
            @click="initDealPanel"
          >重置
          </el-button>
        </div>
      </div>
    </div>
  </div>
</div>
</div>
<div layout:fragment="js">
  <script src="/static/js/module/illegal-monitor/model/MoIllegalMedia.js"></script>
  <script src="/static/js/module/illegal-monitor/api/moIllegalMediaApi.js"></script>
  <script src="/static/js/module/basic-data/api/baseHouseInfoApi.js"></script>
  <script src="/static/js/module/illegal-monitor/admin_multimedia.js"></script>
</div>
</body>
</html>
